$bg: #333;
$back: #000;
$white: #fff;
$mainBg: #f4f4f4;
$tipBg: #F5FAFF;
$tipFg: #666;
$shadow: rgba(0, 0, 0, 0.8);

body {
    background: $bg;
}

a {
    text-decoration: none;
}

footer,
header {
    background: $back;
    color: $white; 
    a {
        color: $white;
        text-decoration: none;
    }
}
.btn,
.zd-tab .zd-tab-head .zd-tab-item.active,
.zd-tab .zd-tab-head .zd-tab-item:hover {
    background: $bg;
    color: $white;
}

header {
    height: 50px;
    line-height: 50px;
    position: fixed;
    z-index: 500;
    top: 0;
    left: 0;
    right: 0;
}

footer {
    padding: 32px 20px;
    position: relative;
}

.container {
    width: 1200px;
    margin: 0 auto;
    position: relative;
}

.app-wrapper {
    width: 1200px;
    margin: 50px auto 0;
    position: relative;
    .search-container {
        display: none;
    }
    .sidebar-container {
        font-size: 1rem;
    }
    &.search-mode {
        transform-origin: 50vw 50vh;
        transform: perspective(1000px) translate3d(0,50vh,0) rotate3d(1,0,0,30deg);
        pointer-events: none;
        max-width: 1920px;
        margin: 0 auto;
        overflow: auto;
        height: 100vh;
        display: block;
        .search-container {
            display: block;
            pointer-events: auto;
        }
    }
    &.wrapper-min {
        width: 100%;
        .sidebar-container {
            left: -208px;
            .sidebar-container-toggle {
                &::before {
                    content: "\f101";
                }
            }
        }
        .main-container {
            width: 100%;
            margin-left: 0;
        }
    }
}

.sidebar-container {
    width: 208px;
    left: 0;
    transition: left 1s;
    vertical-align: baseline;
    padding: 20px 12px 60px 36px;
    top: auto;
    position: absolute;
    overflow-y: visible;
    display: inline-block;
    .sidebar-container-toggle {
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        text-rendering: auto;
        position: absolute;
        right: -12px;
        width: 12px;
        height: 80px;
        background-color: #333;
        z-index: 199;
        font-size: 10px;
        line-height: 80px;
        text-align: center;
        color: #fff;
        cursor: pointer;
        &::before {
            content: "\f100";
        }
    }
}

.main-container {
    transition: all 1s;
    width: calc(100% - 208px);
    position: relative;
    vertical-align: baseline;
    background-color: $mainBg;
    flex-grow: unset;
    display: inline-block;
    top: 0;
    padding: 8px;
    min-height: 300px;
    margin-left: 208px;
}

.page-tip {
    border: 1px dashed $bg;
    padding: 10px;
    border-radius: 5px;
    background-color: $tipBg;
    position: relative;
    .blue {
        color: $bg;
    }
    ul {
        width: 100%;
        padding: 0;
        li {
            padding-left: 10px;
            list-style: inside;
            a {
                color: $tipFg;
            }
        }
    }
    .toggle {
        position: absolute;
        right: 0;
        top: 10px;
        height: 26px;
        width: 26px;
        &::before {
            font-family: "Font Awesome 5 Free";
            font-size: 14px;
            font-weight: 900;
            font-size: inherit;
            text-rendering: auto;
            content: "\f068";
        }
    }
    &.min {
        width: 200px;
        ul {
            display: none;
        }
        .toggle {
            &::before {
                content: "\f067";
            }
        }
    }
}

.breadcrumb {
    padding: 8px 15px;
    list-style: none;
    background-color: #f5f5f5;
    border-radius: 4px;
    >li {
        display: inline-block;
        &.active {
            color: #777;
        }
        +li::before {
            padding: 0 5px;
            color: #ccc;
            content: "/\00a0";
        }
    }
}

.page-header {
    height: 30px;
    background: transparent;
    .actions {
        right: 20px;
        button {
            background: $back;
            color: $white;
            line-height: 30px;
            padding: 0 8px;
            margin: 0;
            border: none;
            &.active {
                background: #888;
            }
        }
    }
}

.full-theme {
    .container {
        width: 100%;
    }
}

.column-item {
    width: 300px;
    display: inline-block;
    position: relative;
    height: 100px;
    background-color: #fff;
    margin: 10px;
    vertical-align: top;
    .icon {
        position: absolute;
        width: 100px;
        height: 100px;
        text-align: center;
        background-color: #333;
        color: #fff;
        padding-top: 20px;
        font-size: 40px;
    }
    .content {
        margin-left: 100px;
        padding: 20px 10px;
    }
}

.page-search {
    .form-horizontal {
        display: inline-block;
    }
    .pull-right {
        float: right;
    }
    &::after {
        content: " ";
        display: block;
        clear: both;
    }
}

.page-not-found {
    margin-top: 10vh;
    p{
        text-align: center;
        font-size: 20px;
    }
    .content {
        text-align: center;
        img {
            max-width: 100%;
        }
    }
}

@media (max-width: 1200px){
    .container {
        width: 100%;
    }
    .app-wrapper {
        width: 100%;
    }

}

@media (max-width: 767px){
    .app-wrapper {
        width: 100%;
        min-height: calc(100vh - 50px);
        .sidebar-container {
            .sidebar-container-toggle {
                &::before {
                    content: "\f0c9";
                }
            }
        }
        &.wrapper-min {
            .sidebar-container {
                left: 0;
                box-shadow: 0 0 20px $shadow;
                .sidebar-container-toggle {
                    box-shadow: none;
                    left: .5rem;
                    &::before {
                        content: "\f00d";
                    }
                }
            }
            &.sidebar-fixed {
                .sidebar-container {
                    position: fixed;
                    top: 50px;
                }
            }
        }
    }
    .sidebar-container {
        left: -208px;
        transition: left .3s;
        z-index: 189;
        bottom: 0;
        .sidebar-container-toggle {
            display: block;
            position: fixed;
            right: auto;
            font-size: inherit;
            line-height: unset;
            width: auto;
            height: auto;
            left: .7rem;
            bottom: .7rem;
            font-size: 2rem;
            background: $bg;
            box-shadow: 0 0 20px $shadow;
            transition: all .3s;
            padding: 4px 6px;
            color: $white;
        }
    }
    .main-container {
        margin-left: 0;
        width: 100%;
        padding-bottom: 50px;
    }
    .auto-hide {
        display: none;
    }
    table,
    .table {
        .btn {
            padding: 0 10px;
            margin: 0;
        }
    }
    .full-theme {
        .main-container {
            transition: all .3s;
        }
        .sidebar-container {
            &.expand {
                box-shadow: none;
                &+.main-container {
                    transform: translateX(208px);
                }
            }
        }
    }
    .column-item {
        width: 90%;
        margin: 10px 5%;
    }
}
